#include "main.h"
__HufTree ** makeArrHufTree (__HufTree ** arr,__HufTree * elm, int * count)
{
	count[0] ++;
	arr = (__HufTree **) realloc (arr,sizeof(__HufTree*)*count[0]);	
	envInf.HufTree_list = arr;
	if (!arr) cl_exit (MAKE_ARR_HUFFTREE,MEMORY_ERR);
	arr[count[0] - 1] = NULL;
	arr[count[0] - 2] = elm;
	if (elm->left)	arr = makeArrHufTree (arr,elm->left,count);
	if (elm->right)	arr = makeArrHufTree (arr,elm->right,count);
	return arr;
}